#include <bits/stdc++.h>

int gcd(int a, int b) {
   while (b > 0) {
     int c = a % b;
     a = b;
     b = c;
   }
   return a;
}

int main() {
  int a, b, c;
  scanf("%d : %d : %d", &a, &b, &c);
  int x[3] = {b + c, a + c, a + b};
  int g = gcd(x[0], gcd(x[1], x[2]));
  x[0] /= g; x[1] /= g; x[2] /= g;
  std::sort(x, x + 3);
  printf("%d:%d:%d\n", x[0], x[1], x[2]);
}
